package com.etoak.entity;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Cart {

    @NotNull(message = "dishId 不能为空")
    private Integer dishId;

    @NotBlank(message = "count 不能为空")
    private String dishName;

    @NotNull(message = "count 不能为空")
    @Min(value = 1,message = "count 最小值为1")
    private Integer count;

}
